<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Title</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <%--<script src="../js/jquery-3.4.1.min.js" language="JavaScript"></script>--%>
    <%--<script language="JavaScript">--%>
        <%--$(function () {--%>
            <%--$.get("/getGrade",null,function (www) {--%>
                <%--for (var i=0;i<www.length;i++){--%>
                    <%--var option=$("<option value="+www[i].gid+">"+www[i].gname+"</option>");--%>
                    <%--$("#gid").append(option);--%>
                <%--}--%>
            <%--},"json");--%>
        <%--});--%>
    <%--</script>--%>
</head>
<style>
    div{
        text-align: center;
    }
    .ginput{
        float: left;
    }
</style>
<body>
<div class="jumbotron">
    <h1>添加学生</h1>
    <p>ヾ(=･ω･=)o</p>
    <p><a class="btn btn-primary btn-lg" href="showStudentByPage" role="button">点击返回</a></p>
</div>
<form id="form1" class="ginput" align="center" name="form1" method="post" action="/addStudent">
    <div class="row" style="position: absolute;left: 40%;">
    <div class=" input-group input-group-sm col-sm-4 ginput">
        <span class="input-group-addon glyphicon glyphicon-barcode" id="xh">学号:</span>
        <input type="text" name="xh"  class="form-control" placeholder="请输入学号(*^▽^*)" aria-describedby="basic-addon1">
    </div>

    <div class="input-group input-group-sm col-sm-4 ginput">
        <span class="input-group-addon glyphicon glyphicon-user" id="name">姓名:</span>
        <input type="text" name="name"  class="form-control" placeholder="请输入姓名(*^▽^*)" aria-describedby="basic-addon1">
    </div>

    <div class="input-group input-group-sm col-sm-4 ginput">
        <span class="input-group-addon glyphicon glyphicon-piggy-bank" id="age">年龄:</span>
        <input type="text" name="age"  class="form-control" placeholder="请输入年龄(*^▽^*)" aria-describedby="basic-addon1">
    </div>

        <div class="input-group input-group-sm col-sm-4 ginput" style="border:gainsboro 1px solid">
            <span class="input-group-addon glyphicon glyphicon-sunglasses" id="sex">性别:</span>
            <input name="sex" type="radio" id="radio" value="男" checked="checked" />
            男
            <input type="radio" name="sex" id="radio2" value="女" />
            女
        </div>

        <div class="input-group input-group-sm col-sm-4 ginput">
            <span class="input-group-addon glyphicon glyphicon-gift" id="birthday">生日:</span>
            <input type="date" name="birthday"  class="form-control" placeholder="请输入年龄(*^▽^*)" aria-describedby="basic-addon1">
        </div>

        <div class="input-group input-group-sm col-sm-4 ginput">
            <span class="input-group-addon glyphicon glyphicon-home" id="address">地址:</span>
            <input type="text" name="address"  class="form-control" placeholder="请输入地址(*^▽^*)" aria-describedby="basic-addon1">
        </div>

        <div class="input-group input-group-sm col-sm-4 ginput" style="border:gainsboro 1px solid">
            <span class="input-group-addon glyphicon glyphicon-sort" id="state">状态:</span>
            <input type="radio" name="state" id="textfield4" value="0" checked="checked"/>在读
            <input type="radio" name="state" id="textfield5" value="1"/>未读
        </div>

        <div class="input-group input-group-sm col-sm-4 ginput">
            <span class="input-group-addon glyphicon glyphicon-sort-by-alphabet" >年级:</span>
            <select id="gid" name="gid" class="input-group input-group-sm col-sm-4 ginput form-control">
                <c:forEach items="${gli}" var="g">
                    <option value="${g.gid}">${g.gname}</option>
                </c:forEach>
            </select>
        </div>
    </div>

    <div style="position: absolute; top: 82%; left:48%" class="btn-group input-group input-group-sm col-sm-4 ginput" role="group" aria-label="...">
        <button type="submit" class="btn btn-success">添加</button>
    </div>
</form>
</body>
</html>
